import {
  uploadAction,
  getAction,
  deleteAction,
  putAction,
  postAction,
  httpAction,
  postFormData
} from '@/api/manage'
const gateway = '/gateway/api'
const gateApi = '/api/gateway'
const jnby = '/jnby-boot'

// const queryLocationUrl = (params) => getAction(jnby + '/sys/permission/queryLocationUrl', params) // 查询外部菜单跳转URL
const matchList = (params) => postAction(gateway + '/admin/fashioner/match/list', params) // 列表查询
const waitPerfectList = (params) => postAction(gateway + '/admin/fashioner/match/waitPerfectList', params) //待完善搭配列表
const queryDim = () => postAction(gateway + '/openapi/product/queryDim') // 查询大类小类
const perfectDelete = (params) => postAction(gateway + `/admin/fashioner/match/deleteById`, params) //待完善搭配列表删除
const finishBy = (params) => postAction(gateway + `/admin/fashioner/match/finishById`, params) // 完善搭配列表
const addCondition = (params) => postFormData(gateway + '/admin/fashioner/match/addCondition', params) // 新增页面条件加载
const upOrDown = (params) => postAction(gateway + '/admin/fashioner/match/upOrDown', params) // 批量上下架
const matchDelete = (params) => postFormData(gateway + `/admin/fashioner/match/delete/${params}`) // 删除
const matchCreate = (params) => postAction(gateway + '/admin/fashioner/match/create', params) // 创建有搭
const goodsSkcDetail = (params) => postAction(gateway + '/admin/product/goodsSkcDetail', params) // 查询SKC商品详情
const log = (params) => getAction('/sys/log/list', params) // 查询日志
const listByLook = (params) => postAction(gateway + '/admin/fashioner/match/listByLook', params) // 搭配素材列表查询
const getSizeNos = () => getAction(gateway + `/admin/product/getSizeNos`) // 查询季节接口
const createQiHua = (params) => postAction(gateway + '/admin/fashioner/match/createQiHua', params) // 创建企划
const importExcel = (params) => uploadAction(gateway + '/admin/customerAskBox/importExcelForAskBox', params) // 导入
const updateLook = (params) => postAction(gateway + '/admin/fashioner/match/updateLookStatusById', params) // look启用禁用
const selectGoodsList = (params) => postAction(gateApi + '/jnby-product-center/product/api/selectGoodsListBySkuIds', params) // 查询SKC商品详情

const createLook = (params) => postAction(gateway + '/openapi/look/createOrUpdateLook', params) // 创建或者编辑look
const updateLookPartFunction = (params) => postAction(gateApi + '/jnby-material-center/material/api/createOrUpdateLookPartFunction', params) // 新编辑保存



const queryBatchProductSkcMatted = (params) => postAction(gateway + '/openapi/product/queryBatchProductSkcMatted', params) // 生成搭配图片
export {
  queryBatchProductSkcMatted,
  matchList,
  addCondition,
  upOrDown,
  matchDelete,
  matchCreate,
  goodsSkcDetail,
  updateLook,
  log,
  listByLook,
  getSizeNos,
  createQiHua,
  importExcel,
  queryDim,
  waitPerfectList,
  perfectDelete,
  finishBy,
  createLook,
  selectGoodsList,
  updateLookPartFunction
}